<% add_decidim_page_title(t("taxonomies", scope: "decidim.admin.titles")) %>

<div class="card" aria-labelledby="taxonomies-title">
  <div class="item_show__header">
    <div class="w-full">
      <h1 class="item_show__header-title" id="taxonomies-title">
        <%= t "decidim.admin.titles.taxonomies" %>
        <% if allowed_to? :create, :taxonomy %>
          <%= link_to t(".new_taxonomy"), new_taxonomy_path, class: "button button__sm button__secondary new" %>
        <% end %>
      </h1>
      <p class="mt-2 text-gray-600">
        <%= t(".description") %>
      </p>
    </div>
  </div>
  <% if collection.any? %>
    <%= render "filters" %>

    <% if @taxonomies.any? %>
      <%= render "table", collection: @taxonomies if @taxonomies %>
    <% else %>
      <p><%= t(".no_items_found") %></p>
    <% end %>
  <% else %>
    <p><%= t("decidim.admin.taxonomies.no_taxonomies") %></p>
  <% end %>
</div>
